package day10;

public class newzuoye {
	public static String main(String[] args) {
		String str = "       ";
		int startIndex = 0;

		int endIndex = str.length() - 1;
		if (str == null || str.equals(" ")) {
		System.out.println('a');
			return"";
		
		}
		while (startIndex <= endIndex && str.charAt(startIndex) == ' ') {
			startIndex++;
		}
		while (startIndex <= endIndex && str.charAt(endIndex) == ' ') {
			endIndex--;
		}
		String result = str.substring(startIndex, endIndex + 1);
		System.out.println(result);
		return result;
	}
}